from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt


def view1(request):
    if request.method == 'GET':
        return HttpResponse('发起了GET请求')
    else:
        return HttpResponse('发起了POST请求')